<template>
  <div class="father">
    <h4>我是父组件</h4>
    <h4>子组件传递给我的玩具是：{{ toy }}</h4>
    <Child :getToy="getToy"></Child>
  </div>
</template>

<script setup lang="ts" name="Father">
import {ref} from 'vue'
import Child from './Child.vue'

let toy = ref('')

function getToy(sonToy: string) {
  toy.value = sonToy
}
</script>

<style scoped>

</style>
